package cn.edu.nchu.service.impl;

import cn.edu.nchu.dao.TestDao;
import cn.edu.nchu.entity.TestInfo;
import cn.edu.nchu.service.TestService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

@Service
public class TestServiceImpl implements TestService {

    @Autowired
    private TestDao testDao;

    @Override
    public TestInfo findById(Integer id) {
        return testDao.findById(id).get();
    }

    @Override
    public TestInfo create(TestInfo testInfo) {
        return testDao.save(testInfo);
    }
}
